package com.ddwl.schema.bo.order;

import com.ddwl.schema.vo.goods.SkuVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * CreateSeckillOrderBo.java的实现描述：秒杀下单
 * @author wenbin
 */
@Data
public class CreateSeckillOrderBo {

    @NotNull(message = "活动ID不能为空")
    @ApiModelProperty("秒杀活动id")
    private String seckillId;


    @ApiModelProperty("随机码")
    private String token;
    @NotNull
    @ApiModelProperty("barcode")
    private String barcode;

    @NotNull(message = "skuId不能为空")
    @ApiModelProperty("skuid")
    private String skuId;

    @ApiModelProperty("商品id")
    private String itemId;

    @ApiModelProperty("商品名称")
    private String itemName;

    @ApiModelProperty("商品金额")
    private BigDecimal itemPrice;

    @ApiModelProperty("商品描述")
    private String itemSpecs;

    @ApiModelProperty("秒杀价格")
    private BigDecimal seckillPrice;

    @NotNull(message = "下单数量不能为空")
    @Min(value = 1,message = "最少购1件")
    @ApiModelProperty("秒杀数量")
    private Integer seckillQty;

    @ApiModelProperty("秒杀商品详细信息")
    private SkuVo skuVo;

    @ApiModelProperty("用户收货地址ID")
    private String userAdderId;

    @ApiModelProperty("0快递1外送2自提默认快递")
    private Integer deliveryType;

    @ApiModelProperty(value = "备注")
    private String remark;


    @Size(max = 15,message = "电话长度过长")
    @ApiModelProperty("自提用户联系电话")
    private String userMobile;

    @ApiModelProperty(value = "来源信息信息(推广的时候用)")
    private String source;

    @ApiModelProperty(value = "用户id")
    private String userId;
    @ApiModelProperty(value = "用户姓名")
    private String userName;
    @ApiModelProperty(value = "来源product")
    private String product;
    @ApiModelProperty(value = "主订单id")
    private String masterOrderId;

}

